package com.itheima.protocol.curator;

import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;

public class CuratorClientUtils {

    private final static String CONNECTIONSTRING="192.168.1.108:2181";
    private static CuratorFramework curatorFramework;


    public static CuratorFramework getInstance(){
        curatorFramework = CuratorFrameworkFactory.newClient(CONNECTIONSTRING, 5000, 5000,
                new ExponentialBackoffRetry(1000, 3));

        curatorFramework.start();
        return curatorFramework;
    }
}
